#include "quesion26.h"
#include <iostream>
#include <vector>
using namespace std;

int quesion26::removeDuplicates(vector<int>& nums)
{
    if (nums.size()==0){
        return 0;
    }
    int n=1;
    for(int i=1;i<nums.size();i++){
        if(nums[i]!=nums[i-1]){
            nums[n++]=nums[i];
        }
    }
    return n;
}
